Installing NetCloak requires several steps, many of which are different depending on which Web server you are using. The following sections provide an overview of the process, then specific instructions for several popular Mac OS Web servers. If you are already comfortable with configuring your Web server to use CGI or plug-in extensions you'll find NetCloak simple to install. Even if you are familiar with configuring actions, we suggest you skim this chapter for specific procedures and options unique to NetCloak.
If you have already installed the NetCloak Introduction, you may be thinking that you do not need to do any further installation. The Introduction is designed to provide a simple and relatively fool-proof setup, making it as easy as possible to see NetCloak in action. However, it is far from the optimal configuration for most Web servers. Installing NetCloak for permanent use on your Web server according to the instructions here is well worth the extra effort. This way NetCloak will always process your pages so the NetCloak commands in them will always work.
Each of the HTML pages you create using NetCloak commands must be processed by NetCloak, or "cloaked". Most Web servers in use today make use of "suffix mappings" and "actions", which greatly simplifies using NetCloak (and many other server add-on tools) on your server.
An action is configured in the Web server, and defines a method for handling a request. Most servers have built-in actions for "TEXT", which tells the server to return the requested file as text (ASCII) data, and "BINARY", which tells the server to send binary data. Servers also allow the user to define actions which tell the server to ask a plug-in module or an external CGI to handle the request instead of just sending the requested file.
A file suffix is the last few characters of the filename, and begins with a period. File suffixes are normally used to denote what type of information is contained in a file, such as HTML text or a GIF image. Common suffixes include: ".html", ".gif", and ".jpeg". A "suffix mapping" establishes a relationship between files with a particular suffix and a particular action to be taken. For example, you can configure your Web server to use NetCloak as an action to process all files with the suffix ".html".
Exactly how you define suffix mappings and the action to be taken varies from server to server. Basic instructions for several different servers are included in the following sections. For detailed information on configuring suffix mappings, see the documentation that came with your server.
No matter what server you are using, we suggest that you take the time to configure at least one suffix that uses NetCloak to process files. Remember that any page you use NetCloak extension commands in will need to be named with the appropriate filename suffix. For example, if you define a suffix mapping of ".nclk" for NetCloak processing, any page that includes NetCloak commands must have a filename ending in ".nclk".
To install NetCloak, you must first choose the CGI or plug-in version, then place NetCloak and its associated files in the appropriate places on your server. You may also need to launch NetCloak and select a root folder. Finally, you must create a suffix mapping and an associated action to call NetCloak when pages are requested from your server. For most servers, you will also need to set the names of the default, error and no access files to match the Web server.
Because NetCloak requires very little overhead, most Webmasters that use NetCloak simply make NetCloak the action responsible for processing pages with the suffix ".html". Since all of your HTML pages most likely end in ".html" already, this will allow you to use NetCloak in any of your HTML pages without worrying about whether the page is cloaked or not.
NetCloak includes two versions: a Common Gateway Interface (CGI) application, and a Plug-In. If your Web server supports the WebStar API standard for Web server plug-ins, we strongly recommend that you use the NetCloak Plug-In for the best results. Servers that support the WebStar API ("W*API") include: WebSTAR 1.3 and later, Quid Pro Quo 2.0 and later, AppleShare IP 5.0.2 and later, and WebTen.
NetCloak imposes almost zero overhead when running as a Plug-In, ensuring peak performance from your Web server. With a correctly configured MIME mapping, NetCloak will process all of your pages automatically so you can use NetCloak commands in any of your pages.
The NetCloak CGI is not as fast as the plug-in, but is compatible with Web servers such as Mac OS 8's Web Sharing that do not support the WebSTAR API Plug-In interface. The CGI application is also used for configuring and maintaining the NetCloak Plug-In.
The location of the NetCloak application or plug-in and the NetCloak support files is dependent on the Web server application you are using. The CGI version of NetCloak is normally installed in the Web server root folder or "cgi-bin" folder. If the NetCloak CGI application is in a folder other than the Web server root folder, you will need to launch NetCloak and select the root folder on the Files tab of the NetCloak Configuration window. The "NetCloak Files" folder, containing NetCloak's preferences, macros and other support files must be in the same folder as the NetCloak application.
If you are installing the NetCloak plug-in, the NetCloak Plug-In file must go in the Web server's Plug-Ins folder. This folder is normally named "Plug-Ins" and is usually located in the Web server root folder. The "NetCloak Files" folder must be placed in the folder containing the Plug-Ins folder. The NetCloak Plug-In will automatically select the correct root folder.
While it is possible to use NetCloak without defining an action or suffix mapping, most users configure the Web server so that it calls NetCloak to process all HTML files. This will allow you to use NetCloak in any of your HTML pages without worrying about whether the page is cloaked or not.
Most Web servers define actions and suffix mappings separately. WebSTAR, Quid Pro Quo and WebTen work this way, so you must first define an action which calls NetCloak, then assign that action to selected suffixes by defining suffix mappings (sometimes called "MIME mappings" or "MIME extensions"). The NetCloak plug-in will automatically define an action for itself named "CLOAK_PI", so if you are installing the plug-in you only need to worry about creating an appropriate suffix mapping.
Some Web servers define actions and suffix mappings together. AppleShare IP defines MIME mappings which include both a file suffix and the method for handling requests for that file type. The Web Sharing control panel defines actions which are similar to AppleShare IP's MIME mappings.
For servers like WebTen and Quid Pro Quo which support multiple virtual-hosted or multihomed Web sites served by a single server, you may need to define actions and suffix mappings for each site separately.
When a user requests a file which does not exist, or the user has insufficient privileges to access, Web servers return some sort of error page. Similarly, when a user makes a request with a file path but no filename, Web servers return a predefined "default" or "index" page.
When NetCloak handles such a request, it must perform the same function. NetCloak uses HTML files for the default, error and no access pages, so it must be configured with the names of these files. By default, these are named "error.html", "noaccess.html" and "default.html", respectively. For servers that also use HTML files, NetCloak should be configured to use the same files as the server. If you have a server such as AppleShare IP or Web Sharing which do not use HTML files for these pages, you will need to create them and configure NetCloak with the filenames.
In particular, check for support for W*API plug-ins, and look for information about setting up file "suffix mappings" and creating "actions" or "action handlers".
The NetCloak plug-in automatically registers an action called "CLOAK_PI", and registers a suffix mapping which maps the ".nclk" file suffix to the "CLOAK_PI" action. You should also be able to modify the suffix mapping for ".html" files so that they are handled by the "CLOAK_PI" action (and thus the NetCloak plug-in).
The NetCloak CGI must be configured manually. You should create an "action" named "CLOAK" that defines a path to "NetCloak.acgi" as its handler, and then create a "suffix mapping" that maps ".nclk" files (and optionally ".html" files) to the NetCloak action.
If your server does not support action-based CGIs, you will need to add a command to your URLs to tell the Web server that NetCloak must process the document. For servers that do not support actions or suffix mappings, you cannot use the NetCloak plug-in, and must use the CGI.
To invoke NetCloak for a particular page without a suffix mapping, simply add "/NetCloak.acgi$" between the server name and document path in URLs. For example, the URL:
http://your.server.com/myFolder/pageone.html
...would become...
http://your.server.com/NetCloak.acgi$/myFolder/pageone.html
...to specify that the page be cloaked.
For this to work correctly, NetCloak must reside in your server's root folder, and your server must recognize that filenames ending in ".acgi" are used to invoke CGI applications.
Most servers support calling a CGI in this manner, so it is a good way to force your Web server to return a page through NetCloak when you are not sure if a suffix mapping is working correctly.
Once you have created a suffix mapping to use NetCloak, your server will always send files with that suffix through NetCloak. If you remove NetCloak, an error will result unless you reset the suffix mapping. If you are using WebSTAR, you can use the Auto-Map menu command "Map WebSTAR .html files to Binary action" or "Map WebSTAR .nclk files to Binary action" depending on whether all .html files or only selected files were processed by NetCloak.
If you are using a Web server other than WebSTAR, you will need to manually remove the suffix mapping. See your Web server documentation for instructions on editing suffix mappings and default suffix mappings. If you manually created a suffix mapping for a suffix other than .html or .nclk, then you will need to manually reset it.
Due to limitations in how CGIs interact with the server, the NetCloak CGI is limited to a file size of 60k bytes. All files larger than 60k will be truncated by the CGI before they are passed to the server. In some cases, even 60k may be too much data for your server to handle in a single request. If you notice problems when serving large files (over 32k) with NetCloak, visit the NetCloak FAQ list at "www.maxum.com" for up-to-date information on handling large files.
The NetCloak plug-in is capable of handling substantially larger files, and the plug-in limits files to 128k by default.
Advanced users can adjust some of NetCloak's limits using ResEdit. See the section "Adjusting Internal Settings" for more information.
Copyright © 1996-7 Maxum Development Corporation
820 South Bartlett Road - Suite 104
Streamwood, IL 60107
http://www.maxum.com/